runOnStartup(async runtime => {

    cc_Game.addEventListener("minerTick", (e) => {
    })
    cc_Game.addEventListener("minerInit", (e) => {
        Miner_mmMinerSpwnPointSet.initSet()
    })
});
globalThis.Miner_mmMinerSpwnPointSet = {
    initSet: function () {
        let MinerSpPoint = runtime.objects.MinerSpwnMask?.getFirstInstance()
        if (MinerSpPoint == null) {
            return;
        }
        let currday = runtime.globalVars.CurDay
        let Vernier = MinerVernierSpwn.setVernier
        if (Vernier == null) return

        // 生成位置的偏移量
        let spwnOffset = 500
        // 设置遮罩位置
        MinerSpPoint.x = Vernier.x
        MinerSpPoint.y = Vernier.y + spwnOffset

        // 到达信号
        let e = new CustomEvent("MinerMaskArr", {})
        window.dispatchEvent(e)
    }, newPoint: function (x, y) {
        // 生成新的遮罩
        let newPoint = runtime.objects.MinerSpwnMask.createInstance("MinerSpwnMask", x, y, true)
        return newPoint
    }
}
export default Miner_mmMinerSpwnPointSet